import json
import time
from selenium import webdriver

drive = webdriver.Chrome()
drive.get("http://login.taobao.com/")

time.sleep(30)
dictCookies = drive.get_cookie()
print(dictCookies)

jsonCookies = json.dumps(dictCookies)

with open('cookie_tao.json', 'w') as f:
    f.write(jsonCookies)